<me:UIWBBST x:Class="WPFExcelReport.TDTWB06"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                    xmlns:VV="clr-namespace:WPFExcelReport;assembly=TVVLIEF" 
                    xmlns:BW="clr-namespace:WPFExcelReport;assembly=TWBBEW" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIWBBST.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:KM2YD x:Key="KM2YD"/>
        <ucd:M2YD x:Key="M2YD"/>
        <ucd:NOTConverter x:Key="not"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIWBBST.Resources>
    <Grid IsEnabled="{Binding IsBusy,Converter={StaticResource not}}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel>
            <TextBlock Text="{Binding WBBART}" Width="Auto"/>
            <TextBlock Text="{Binding WBBFARBE}"/>
            <TextBlock Text="{Binding WBBBESCHICH}"/>
        </StackPanel>
        <DataGrid  Grid.Row="1" Grid.Column="0" 
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   IsReadOnly="True"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"     
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}" 
                   IsSynchronizedWithCurrentItem="True" 
                   MouseLeftButtonDown="dlgMaster_MouseLeftButtonDown"
                   MouseRightButtonDown="dlgMaster_MouseRightButtonDown"
                   x:Name="dlgMaster"  
                   HorizontalAlignment="Left"
                   RowDetailsVisibilityMode="Visible"  Margin="0,0,0,0"
                    >
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=WBBAUFPOS,Converter={StaticResource pnum}}"  Header="行号"  Width="Auto" /> 
                <DataGridTextColumn   Header="{Binding Source={Localization:Translate Word=箱号}}"   Binding="{Binding WBBPACKNR}"/>  
                <DataGridTextColumn  Header="{Binding Source={Localization:Translate Word=数量(码)}}" Binding="{Binding WBBISTKLG,Converter={StaticResource ResourceKey=KM2YD}}"/>
                <DataGridTextColumn Binding="{Binding Path=WBBSTKNR,Converter={StaticResource pnum}}" Header="{Binding Source={Localization:Translate Word=布卷号}}"  Width="Auto" /> 
            </DataGrid.Columns>
        </DataGrid  >
        <ex:TPage  Grid.Row="2" Visibility="{Binding IsPage,Converter={StaticResource bv}}"/>
        <WrapPanel Grid.Row="3">
            <TextBlock Text="{Binding Source={Localization:Translate Word=数量:}}"  Margin="10,0,0,0"></TextBlock>
            <TextBlock Text="{Binding SUM1, Converter={StaticResource d1000}}" Foreground="Red" Margin="10,0,0,0"></TextBlock>
            <TextBlock Text="{Binding Source={Localization:Translate Word=米}}"  Margin="10,0,0,0"></TextBlock> 
            <TextBlock Text="{Binding Source={Localization:Translate Word=卷数:}}"  Margin="10,0,0,0"></TextBlock>
            <TextBlock Text="{Binding Counts}" Foreground="Red" Margin="10,0,0,0"></TextBlock>
        </WrapPanel>
    </Grid>
</me:UIWBBST>
